import service from '@/utils/request'

export const useAssetStorageApi = (id: number) => {
	return service.get('/nb/asset/storage/findById', {
		params: {
			id: id
		}
	})
}
export const findListAll = () => {
	return service.get('/nb/asset/storage/list')
}

export const useAssetStorageSubmitApi = (dataForm: any) => {
	if (dataForm.id) {
		return service.post('/nb/asset/storage/edit', dataForm)
	} else {
		return service.post('/nb/asset/storage/add', dataForm)
	}
}

export const useEditIsEnable = (dataForm: any) => {
	return service.put('/nb/asset/storage/editIsEnable', dataForm)
}
